package com.varian.system.dto;

import com.varian.system.enums.NoticeReceiveTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Future;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author ben
 * @since 2024/8/27
 */
@Data
@Schema(title = "通知数据对象")
public class SysNoticeDTO {
    @Schema(title = "通知接收者类型")
    @NotNull(message = "通知接收者类型不能为空")
    private NoticeReceiveTypeEnum noticeReceiveType;
    @Schema(title = "通知接收用户")
    private List<Long> noticeReceiverIds;
    @Schema(title = "通知标题")
    @NotBlank(message = "通知标题不能为空")
    private String noticeTitle;
    @Schema(title = "通知描述")
    @NotBlank(message = "通知描述不能为空")
    private String noticeDesc;
    @Schema(title = "通知内容")
    @NotBlank(message = "通知内容不能为空")
    private String noticeContent;
    @Schema(title = "通知发布时间")
    @NotNull(message = "通知发布时间不能为空")
    private LocalDateTime noticePublishTime;
    @Schema(title = "通知过期时间")
    @Future(message = "通知过期时间必须大于当前时间")
    private LocalDateTime noticeExpireTime;
    @Schema(title = "通知类型")
    @NotBlank(message = "通知类型不能为空")
    private String noticeType;
    @Schema(title = "通知图标")
    private String noticeIcon;
}
